"""更新昵称可以重复

Revision ID: 5f967e1f131b
Revises: b8bca82b3eb6
Create Date: 2025-11-17 20:32:29.450301

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '5f967e1f131b'
down_revision: Union[str, Sequence[str], None] = 'b8bca82b3eb6'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f('users_nick_name_key'), 'users', type_='unique')
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(op.f('users_nick_name_key'), 'users', ['nick_name'], postgresql_nulls_not_distinct=False)
    # ### end Alembic commands ###
